package com.webbei.share.action;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.webbei.share.service.ShareSer;
public class UpdateCustomContent extends ActionSupport{
	private Long customId;
	private String customContent;
	private ShareSer ser;
	public String execute() throws Exception{
		//System.out.println(customId);
		if(ser.UpdateCustomContent(customId, customContent)>0)
		{
			ServletActionContext.getResponse().getWriter().write("success");
			ServletActionContext.getResponse().setContentType("text/html");
			return null;
		}
		else{
			ServletActionContext.getResponse().getWriter().write("error");
			ServletActionContext.getResponse().setContentType("text/html");
		}
		//ServletActionContext.getResponse().getWriter().write("success");
		return null;
	}

	public void setSer(ShareSer ser) {
		this.ser = ser;
	}

	public Long getCustomId() {
		return customId;
	}
	public void setCustomId(Long customId) {
		this.customId = customId;
	}
	public String getCustomContent() {
		return customContent;
	}
	public void setCustomContent(String customContent) {
		this.customContent = customContent;
	}
	
}
